global class GetSalerAccountRelationSechduler implements Schedulable {
    global void execute(SchedulableContext sc) {
        Integer year = System.now().year();
    	Integer quarter = Integer.valueOf((System.now().month()-1) / 3 +1 );
    	//判断任务是否完成
    	String only = 'GetSalerAccountRelationSechduler'+year + quarter;
    	List<SchedulerExcuetLog__c> seList =  [select Id , Only__c, Message__c , IsFinished__c , Stage1__c,Stage2__c,Stage3__c,Stage4__c from SchedulerExcuetLog__c  where Only__c =:only ];
    	
    	///任务完成了
    	if(seList.size() >0 && seList[0].IsFinished__c == true) return;
    	SchedulerExcuetLog__c se = seList.size() >0 ? seList[0] : new SchedulerExcuetLog__c(Only__c = only);


    	///获取并验证助理是否在职

    	Map<String,String> assistantMap = new Map<String,String>();
    	for(String s : Label.NoteAssitant_ReturnOrder.split(',') ){
    		String[] ss =s.split('-'); 
    		if(ss.size() > 0 )assistantMap.put(ss[0], ss[1]);
    	}

    	if([select count() from User where Id in: assistantMap.values() and IsActive != true] > 0 ){

    		se.IsFinished__c = false;
    		se.Message__c = '有助理离职了请维护:Label.NoteAssitant_ReturnOrder ';
    		upsert se;
    		return;
    	}

    	upsert se;
    	//获取数据 ..


    }
}